Pcap and PcapNg parsing
Pcap
This crate can read Pcap files from a reader and write them to a writer.
It also provides several parsers for the Pcap file format.
Example: PcapReader
use File;
use PcapReader;
let file_in = open.expect;
let pcap_reader = new.unwrap;
// Read test.pcap
for pcap in pcap_reader
PcapNg
This crate can read PcapNg files from a reader.
It also provides several parsers for the PcapNg file format.
Example: PcapNgReader
use File;
use PcapNgReader;
let file_in = open.expect;
let pcapng_reader = new.unwrap;
// Read test.pcapng
for block in pcapng_reader
Documentation
Installation
This crate is on crates.io.
Add it to your Cargo.toml
:
[]
= "1.1.0"
License
Licensed under MIT.
Disclaimer
To test the library I used the excellent PcapNg testing suite provided by hadrielk.